package com.xjtu.chapter04.ex4_2;

/**
 * @author yjq
 * @version 1.0
 * @date 2021/8/13 20:28
 */
public class SpeedBike extends Bike {
    public void ride(){
        System.out.println("Riding...");
    }
    public void speedUp(){
        super.speedUp();
        speed+=10;
        System.out.println("My speed is: "+speed+" now");
    }
    SpeedBike(){
        super();//调用父类的构造方法
        super.colornum = 12;//调用父类的数据成员
        super.pressHorn();
    }
}
